﻿using Abp.Domain.Entities;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace AbpDemo.Domain.Goods
{
    /// <summary>
    /// 订单商品
    /// </summary>
    [Table("Goods")]
    public class Goods_1:Entity<Guid>
    {
        public Goods_1()
        { }

        public Goods_1(string title, string desc, string specification, decimal price)
        {
            Title = title;
            Desc = desc;
            Specification = specification;
            Price = price;
        }
        /// <summary>
        /// 商品名称
        /// </summary>
        [Required]
        [StringLength(128)]
        [Column(Order = 1, TypeName = "nvarchar(128)")]
        public string Title { get; protected set; }

        /// <summary>
        /// 商品描述
        /// </summary>
        [Column(Order = 2, TypeName = "nvarchar(max)")]
        public string Desc { get; protected set; }

        /// <summary>
        /// 规格
        /// </summary>
        [Column(TypeName = "nvarchar(max)")]
        public string Specification { get; protected set; }

        /// <summary>
        /// 单价
        /// </summary>
        [Required]
        [Column(TypeName = "decimal(16,4)")]
        public decimal Price { get; protected set; }

    }
}
